<script>

$(function() {
	var availableTags = [
	<?php
		require I_PATH . 'xml.php';
		$dvds = $dvd_dom->getElementsByTagName('dvds')->item(0);
		$str = "";
		foreach ($dvds->getElementsByTagName('dvd') as $dvd) {
			$str = $str . "\"" . $dvd->getElementsByTagName('title')->item(0)->nodeValue ."\",";
		}
		//echo $str;
		echo substr($str, 0, strlen($str) - 1);
		
	?>
	];
	$( "#titre" ).autocomplete({
		source: availableTags
	});
});
</script>


